
from fastapi import FastAPI
import uvicorn
from controller.comments import router as router_comments 
from controller.users import router as router_users 
from controller.videos import router as router_videos 
from controller.contests import router as router_contests
from controller.contest_user import router as router_contest_user
from controller.aichat import router as router_aichat
from fastapi.middleware.cors import CORSMiddleware


origins = [
    "*"]

 
app = FastAPI()

app.add_middleware(
    CORSMiddleware,
    allow_origins=origins,
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

app.include_router(router_comments)
app.include_router(router_users)
app.include_router(router_videos)
app.include_router(router_contests)
app.include_router(router_contest_user)
app.include_router(router_aichat)



if __name__ == "__main__":
    uvicorn.run("main:app",host="127.0.0.1",port=8000,reload=True)


